package com.oa.common.dto;

import java.io.Serializable;
import java.util.Objects;

/**
 * @name 部门传送的数据类
 */
public class DepartmentDto implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = -4939208717843443188L;

    /** 部门的名称 **/
    private String name;

    /** 部门说明 **/
    private String decs;

    /** 父级的id **/
    private Long departmentId;

    /** 部门的id **/
    private Long id;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDecs() {
        return decs;
    }

    public void setDecs(String decs) {
        this.decs = decs;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DepartmentDto that = (DepartmentDto) o;
        return Objects.equals(name, that.name) &&
                Objects.equals(decs, that.decs) &&
                Objects.equals(departmentId, that.departmentId) &&
                Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {

        return Objects.hash(name, decs, departmentId, id);
    }

    @Override
    public String toString() {
        return "DepartmentDto{" +
                "name='" + name + '\'' +
                ", decs='" + decs + '\'' +
                ", departmentId=" + departmentId +
                ", id=" + id +
                '}';
    }
}
